package com.svconnect.exceptions;

public class NotNullableException extends RuntimeException {

	private static final long serialVersionUID = 1L;
	
	private Class<?> type;
	
	public Object getType() {
		return type;
	}

	public void setType(Class<?> type) {
		this.type = type;
	}

	public NotNullableException(Class<?> type) {
		super();
		this.type = type;
	}
	
	@Override
	public String getMessage() {
		return String.format("Type %s is not nullable in this context!",type!=null ? type.getName() :"");
	}
}
